Feature or Requirements coverage Report

The Feature Coverage Generator can be used to generate documentation with regard to the testcoverage of product features or requirements. It generates human readable html pages aswell as xml output which may be imported in existing tracability solutions.

The project feature coverage file

The feature coverage file is used to establish the link between features or requirements and the acutual testsuites and testcases. Together with the junit test results and test annotations it is the input of the feature coverage generator.

project.featurecov example
/*
 * This file maps Features or Requirements to Test Suites and Test Cases
 * This enables the generation of test reports for feature or requirement coverage and a simple traceability
 */

Project "Example Project"			// Title for the generated documentation
import "./build/tests/results.xml"  // link to the test run results

/*
 * miniHIL Self Test
 */
minHIL-SelfTest {
	Heartbeat_TestSuite => [
		CheckBlinky ]
}


Requirement-Or-Feature-Name1 {
	A-Testsuite => [ 1
		TestCaseA 2
		TestCaseB
	]
	B-Testsuite => [ 1
		TestCase1
		TestCase2
	]
}

Requirement-Or-Feature-Name2 {
	A-Testsuite => [
		TestCaseA
		TestCaseC
	]
}

A-Feature-Without-Tests-Yet {
 3
}
1 This selects the test suite with the name "A-Testsuite" and "B-Testsuite" to cover the requirement named "Requirement-Or-Feature-Name1"
2 Additionally the test cases contained within the test suites have to be linked to the requirement. It is also possible to only select a subset of the contained test cases
3 Listed features for which no test cases are linked or where the linked test cases have not been executed will be labeled "missing" in the generated documentation.

Running the generator

Currently the generator can only be run using the headless build feature. You can find the documentation here.

If you report only shows "missing" tests make sure that you coverage file imports the correct results.xml file. If you results.xml file is missing execute the tests first using the runTests gradle task.